package router

import (
	"github.com/gin-gonic/gin"
	"holidayone/handler/service"
)

func Router() *gin.Engine {
	r := gin.Default()

	AuthJwt := r.Group("/authJwt").Use(service.ParseJwt())
	{
		AuthJwt.GET("/blackAdd", service.BlackAdd)
	}

	r.POST("/sendSms", service.SendSms)

	r.POST("/register", service.Register)
	r.POST("/login", service.Login)

	r.GET("/userList", service.UserList)
	r.POST("/friendAdd", service.FriendAdd)
	r.POST("/friendUpload", service.FriendUpload)
	r.GET("/friendList", service.FriendList)

	r.GET("/blackList", service.BlackList)
	r.POST("/circleAdd", service.CircleAdd)
	r.GET("/circleList", service.CircleList)
	r.GET("/chat", service.Chat)
	return r
}
